home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / APPMORE.ZIP / APPMORE.H < prev    next >
C/C++ Source or Header  |  1993-04-08  |  6KB  |  197 lines

  1. /* appbar.h */
  2.  
  3. #include <mmsystem.h>
  4.  
  5. #define ID_TIMER    101
  6.  
  7. #define SYSTEM_BUTTON      0
  8. #define SYSTEM_MENU      0
  9. #define FIRST_APPLICATION 1
  10.  
  11. #define ID_BUTTON1    1000
  12.  
  13. #define INI_APPMORE    "AppMore"
  14. #define INI_FILE    "appmore.ini"
  15.  
  16. #define ID_CLOSE    400
  17. #define ID_MOVE        402
  18. #define ID_OK        403
  19. #define ID_CANCEL    404
  20. #define ID_SETUP    405
  21. #define ID_QUICKLOAD    406
  22.  
  23. #define IDMOVE_YES    700
  24. #define IDMOVE_NO    701
  25.  
  26. #define LEFT        "Left"
  27. #define TOP        "Top"
  28. #define COLUMNS        "Columns"
  29. #define BUTTONS     "Buttons"
  30. #define CLOSEALL    "CloseAll"
  31. #define DOUBLECLICK    "DoubleClick"
  32. #define STAYINFRONT    "StayInFront"
  33. #define ONELAUNCH    "OneLaunch"
  34. #define INITIALIZED    "Initialized"
  35. #define NUMBEROFSECTIONS "NumberOfSections"
  36.  
  37. #define SOUNDENABLE    "EnableSound"
  38. #define PROGSTART    "ProgramStart"
  39. #define PROGCLOSE    "ProgramClose"
  40. #define DROPFILE    "DropFile"
  41. #define ERRORMESSAGE    "ErrorMessage"
  42.  
  43. #define LEFT_DEFAULT        "-1"
  44. #define TOP_DEFAULT        "-1"
  45. #define COLUMNS_DEFAULT        "1"
  46. #define BUTTONS_DEFAULT     "-1"
  47. #define CLOSEALL_DEFAULT    "1"
  48. #define DOUBLECLICK_DEFAULT "0"
  49. #define CLOSEPROG_DEFAULT   "1"
  50. #define SHOWMODE_DEFAULT    "0"
  51. #define STAYINFRONT_DEFAULT "0"
  52. #define ONELAUNCH_DEFAULT   "0"
  53. #define ICONNUMBER_DEFAULT  "0"
  54. #define BUTTONLOOK_DEFAULT  "0"
  55. #define INITIALIZED_DEFAULT "0"
  56. #define SECTIONS_DEFAULT    "0"
  57. #define SECTIONNAME_DEFAULT "<none>"
  58.  
  59. #define SOUNDENABLE_DEFAULT    "0"
  60. #define PROGSTART_DEFAULT    "<none>"
  61. #define PROGCLOSE_DEFAULT    "<none>"
  62. #define DROPFILE_DEFAULT    "<none>"
  63. #define ERRORMESSAGE_DEFAULT    "<none>"
  64.  
  65.  
  66. #define MAXFILECHARS    70
  67. #define MAXDIGITS    5
  68. #define NUMICONS    4
  69. #define NUMEDITS    3
  70. #define MAXAPPS     48
  71. #define MAXRES        1280
  72.  
  73. typedef struct {
  74.        int    nColumns;
  75.        int    nButtons;
  76.        int    cxButton;
  77.        int    cyButton;
  78.        } APPWINDOW;
  79.  
  80. typedef enum {NOTALIVE = FALSE, ALIVE = TRUE} STATUS;
  81.  
  82. typedef struct {
  83.     char    IcoName[MAXFILECHARS];
  84.     char    ProgName[MAXFILECHARS];
  85.     char    StartDir[MAXFILECHARS];
  86.     char    Params[MAXFILECHARS];
  87.     HWND    hWndApp;
  88.     int    IconNumber;
  89.     BOOL    ButtonLook;
  90.     STATUS    ProgStatus;
  91.     BOOL    Close;
  92.     short    ShowMode;
  93.     BOOL    NoSound;
  94.     } APPBARBUTTONS;
  95.  
  96. typedef struct {
  97.     short    Left;
  98.     short    Top;
  99.     int    Columns;
  100.     int    Buttons;
  101.     BOOL    QuickExit;
  102.     BOOL    CloseAll;
  103.     BOOL    StayInFront;
  104.     int    Initialized;
  105.     BOOL    BigButtons;
  106.     BOOL    DoubleClick;
  107.     int    Border;
  108.     int    OneLaunch;
  109.     int    SectionNumber;
  110.     int    NumberOfSections;
  111.     char    SectionName[MAXFILECHARS];
  112.     char    DefaultIconDir[MAXFILECHARS];
  113.     } APPSYSTEM;
  114.  
  115. typedef struct {
  116.     int    EnableSound;
  117.     char    ProgramStart[MAXFILECHARS];
  118.     char    ProgramClose[MAXFILECHARS];
  119.     char    DropFile[MAXFILECHARS];
  120.     char    ErrorMessage[MAXFILECHARS];
  121.     } APPSOUND;
  122.  
  123. typedef struct {
  124.     int left;
  125.     int top;
  126.     int width;
  127.     int height;
  128.     } APPMAXSIZE;
  129.  
  130. char szBuffer[256];
  131.  
  132. extern APPBARBUTTONS    AppButton[MAXAPPS], AppButtonDefault;
  133. extern APPSYSTEM    AppSystem;
  134. extern APPWINDOW    AppWindow;
  135. extern APPSOUND     AppSound;
  136. extern APPMAXSIZE    AppMaxSize;
  137. extern HWND        hWndMain, hWndCurrentButton, hWndButton[MAXAPPS];
  138. extern HINSTANCE    hInst;
  139. extern HBITMAP        hAppLogo, hNNever;
  140. extern HBITMAP        hbPressed, hbBlank, hbKeyb;
  141. extern HICON        hSystem, hBlank, hPressed, hQuickLoad;
  142. extern HICON        hRun, hKeybOn, hPressed2, hSystem2;
  143. extern BOOL        bMoveButton, bQuickLoad;
  144. extern int        iCurrent, iKey, iActive, cxChar, cyChar, FirstAppButton;
  145. extern char        szError[256];
  146. extern BOOL        bKeyboardOn, bExecuteProg, bShuffleButton;
  147.  
  148. /* defined in AppMore.c */
  149. extern int  PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow);
  150. extern long WINAPI WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  151.  
  152. /* defined in AppTools.c*/
  153. extern VOID OkMsgBox(char *szCaption, char *szFormat, ...);
  154. extern VOID ErrorMsgBox(char *szCaption, char *szFormat, ...);
  155. extern APPMAXSIZE CalculateAppMaxSize(VOID);
  156. extern TEXTMETRIC RetrieveTextMetrics(HWND hWnd);
  157. extern VOID PASCAL IniRead(VOID);
  158. extern VOID PASCAL SaveButton(int i);
  159. extern int VerifySectionName(LPSTR szSectionName);
  160. extern VOID InitDefaultButton(VOID);
  161. extern VOID SetNormalChildCursor(VOID);
  162. extern VOID SetShuffleChildCursor(VOID);
  163. extern void LoadAllButtonIcons(HICON *hIcon);
  164. extern void LoadAppMoreResources(void);
  165. extern void FreeAppMoreResources(void);
  166.  
  167. /* defined in AppDlgs.c */
  168. extern BOOL WINAPI SystemDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  169. extern BOOL WINAPI MoveDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
  170.  
  171. /* defined in AppExec.c */
  172. extern BOOL PASCAL ProgExec(HWND hWndParent, LPSTR lpszFile, LPSTR lpszParams, LPSTR lpszDir, int nCmdShow);
  173. extern VOID PASCAL StartOrCloseProgram(int);
  174. extern VOID PASCAL CheckProgStatus(VOID);
  175. extern VOID ExecuteErrorHandle(int iError);
  176.  
  177. /* define in AppClose.c */
  178. extern long WINAPI WaitForWMCloseWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  179. extern VOID PASCAL WaitForWMClose(HWND hWndClose);
  180. extern BOOL PASCAL CloseApp(HWND hWndClose);
  181.  
  182. /* defined in AppAbout.c */
  183. extern BOOL WINAPI AboutDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
  184.  
  185. /* defined in AppDraw.c */
  186. extern void DrawItem(LPDRAWITEMSTRUCT lpIconDIS, HICON *hIcon);
  187. extern void DrawBitmap(HDC hDC, short x, short y, HBITMAP hBitmap);
  188.  
  189. /* defined in AppKeyb.c */
  190. extern int KeyboardInterface(int Key);
  191. extern int ProcessSystemKeys(int SysKey);
  192.  
  193. /* Undocumented Windows function in taskman.exe (PCM/FEB92) */
  194. extern BOOL WINAPI IsWinOldApTask(HTASK);
  195.  
  196. #define IsDosWindow(hWnd)   IsWinOldApTask(GetWindowTask(hWnd))
  197.